<layout name="layout" />
                <div class="page-header"><!-- Page header -->
                    <h5><i class="font-home"></i>编辑在线客服</h5>
                </div><!-- /page header -->
                <div class="body">                
                    <!-- Content container -->
                    <div class="container"> 
                	
                        <!-- Site Summary -->
                        <div class="block well">                	
    	
<div class="table-overflow">
<FORM METHOD=POST id="form1" action="{:U('Admin/Online/update')}">	
<TABLE class="table table-bordered table-block tableform">
<TR>  
	<TH width="20%">姓名：</TH> 
	<TD><INPUT TYPE="text" class="input-xxlarge input-require" NAME="name" value="{$vo.name}"></TD>
</TR>
<TR>
	<TH>值班电话：</TH>
	<TD><INPUT TYPE="text" class="input-xxlarge"  NAME="tel" value="{$vo.tel}"></TD>
</TR>
<TR>
	<TH>QQ号码：</TH>
	<TD><INPUT TYPE="text" class="input-xxlarge"  NAME="qq" value="{$vo.qq}"></TD>
</TR>
<TR>
	<TH>开始时间：</TH>
	<TD><INPUT TYPE="text" class="input-xxlarge input-require" NAME="start_time" value="{$vo.start_time|date='H:i:s',###}"></TD>
</TR>
<TR>
	<TH>结束时间：</TH>
	<TD><INPUT TYPE="text" class="input-xxlarge input-require" NAME="end_time" value="{$vo.end_time|date='H:i:s',###}"></TD>
</TR>
<TR>
	<TH>值班周期：</TH>
	<TD class="inputtext">
		<label><input type="checkbox" class="weekday_1" value="1">星期一</label>
		<label><input type="checkbox" class="weekday_2" value="2">星期二</label>
		<label><input type="checkbox" class="weekday_3" value="3">星期三</label>
		<label><input type="checkbox" class="weekday_4" value="4">星期四</label>
		<label><input type="checkbox" class="weekday_5" value="5">星期五</label>
		<label><input type="checkbox" class="weekday_6" value="6">星期六</label>
		<label><input type="checkbox" class="weekday_7" value="7">星期日</label>
	</TD>
</TR>
<TR>
	<TH>备注：</TH>
	<TD><textarea class="input-xxlarge" rows="5" name="remark">{$vo.remark}</textarea>
	</TD>
</TR>
<TR>
	<TH>状态：</TH>
	<TD><SELECT class="input-xxlarge"  NAME="status">
	<option <eq name="vo.status" value="1" >selected</eq> value="1">启用</option>
	<option <eq name="vo.status" value="0" >selected</eq> value="0">禁用</option>
	</SELECT></TD>
</TR>
<TR>
	<TH></TH>
	<TD class="center"><INPUT TYPE="hidden" name="id" value="{$vo.id}">
	<INPUT TYPE="hidden" id="weekday" name="weekday" value="{$vo.weekday}">
	<button type="submit" onclick="getweekday();" class="btn btn-primary">保 存</button>&nbsp;&nbsp;&nbsp;&nbsp;
	<button type="reset" onclick="window.location.href='{:U('Admin/Online/index')}'" class="btn btn-danger">取 消</button>		
	</TD>
</TR>
</TABLE>
</div>
</div>
</div>
</div>
</FORM>
<SCRIPT LANGUAGE="JavaScript">
<!--
jQuery(document).ready(function(){
	var weekday = jQuery("#weekday").val().split(",");
	for(var i=0; i<weekday.length;i++){
		jQuery(".weekday_"+weekday[i]).attr("checked", true);
	}
});

function getweekday(){
	var count = 0;
	var weekday = "";
	for(var i=1; i<=7;i++){
		var chked = jQuery(".weekday_"+i).attr("checked");
		if(chked){
			if(count==0){
				weekday = jQuery(".weekday_"+i).val();
			}else{
				weekday = weekday+","+jQuery(".weekday_"+i).val();
			}
			count++;
		}
	}
	jQuery("#weekday").val(weekday);
}
//-->
</SCRIPT>